package com.lzy.service;

import com.lzy.spring.LzyApplicationContext;

public class Test {
	public static void main(String[] args) {
		// 两种方式，扫描xml配置文件或者配置类。
//		LzyApplicationContext lzyApplicationContext = new LzyApplicationContext("spring-config.class");
		LzyApplicationContext applicationContext = new LzyApplicationContext(AppConfig.class);

		UserInterface userService = (UserInterface)applicationContext.getBean("userService"); // 获取Bean对象
/*		System.out.println(applicationContext.getBean("userService"));
		System.out.println(applicationContext.getBean("userService"));
		System.out.println(applicationContext.getBean("userService"));
		System.out.println(applicationContext.getBean("userService"));*/

		userService.test();

	}
}


